package com.helper.network


import com.sh.doctors.cloud.BuildConfig
import okhttp3.CookieJar
import okhttp3.Interceptor
import okhttp3.OkHttpClient

/**
 * 页面描述：
 *
 *
 * Created by ditclear on 2017/7/28.
 */

class DoctorsNetProvider : NetProvider {

    override fun configInterceptors(): Array<Interceptor>? {
      return null
    }

    override fun configHttps(builder: OkHttpClient.Builder) {

    }

    override fun configCookie(): CookieJar? = null

    override fun configHandler(): RequestHandler {
        return DoctorsHeaderHandler()
    }

    override fun configConnectTimeoutSecs(): Long {
        return CONNECT_TIME_OUT
    }

    override fun configReadTimeoutSecs(): Long {
        return READ_TIME_OUT
    }

    override fun configWriteTimeoutSecs(): Long {
        return WRITE_TIME_OUT
    }

    override fun configLogEnable(): Boolean {
        return BuildConfig.DEBUG
    }

    companion object {
        val CONNECT_TIME_OUT: Long = 10
        val READ_TIME_OUT: Long = 30
        val WRITE_TIME_OUT: Long = 40
    }
}
